<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">{{modalTitle}}</h4>
  </div>
  <div class="modal-body">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group" ng-if="info">
          <label class="col-sm-3 control-label">所属公寓</label>
          <div class="col-sm-8">
            <!--<select ng-model="data.apartmentId" class="form-control"-->
                    <!--ng-options="option.id as option.name for option in apartmentList"></select>-->
            <div class="form-control">{{info.apartmentName}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">名称<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.name" type="text"
                   ng-required="true" name="name"
                   placeholder="房型名称" maxlength="32"/>
            <div class="help-block with-errors"
                 ng-if="modalForm.name.$invalid && !modalForm.name.$pristine">
              名称不可为空
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">面积</label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.acreage" type="text"
                   placeholder="面积" maxlength="50"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">简介</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.description" cols="3" maxlength="1024"
                      placeholder="公寓简介"></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">价格区间</label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.priceDesc" type="text"
                   placeholder="￥1500~￥3000" maxlength="50"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">状态</label>
          <div class="col-sm-8">
            <nobr>
              <label class="ui-radio" ng-repeat="option in modalEnableList">
                <input name="status" ng-value="option.value" type="radio" ng-model="data.enabled">
                <span>{{option.name}}</span>
              </label>
            </nobr>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">房型图</label>
          <div class="col-sm-8">
            <div class="input-group">
              <input type="text"  name="layoutImage" class="form-control" ng-model="data.layoutImage">
              <span class="input-group-addon" ng-click="showPhotoUpload=!showPhotoUpload">
                    <i class="glyphicon glyphicon-upload"></i>
                  </span>
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="data.layoutImage">
          <div class="col-sm-8 col-sm-offset-3">
            <div class="wf-thumbnail-container">
              <img ng-src="{{data.layoutImage}}" class="wf-thumbnail" alt="找不到该图片" maxlength="1024">
            </div>
          </div>
        </div>
        <div class="form-group" ng-show="showPhotoUpload">
          <div class="col-sm-8 col-sm-offset-3">
            <input id="photo-upload-input" class="file" name="file" type="file" data-min-file-count="1">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">缩略图</label>
          <div class="col-sm-8">
            <div class="input-group">
              <input type="text"  name="thumb" class="form-control" ng-model="data.thumb" maxlength="1024">
              <span class="input-group-addon" ng-click="showThumbPhotoUpload=!showThumbPhotoUpload">
                    <i class="glyphicon glyphicon-upload"></i>
                  </span>
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="data.thumb">
          <div class="col-sm-8 col-sm-offset-3">
            <div class="wf-thumbnail-container">
              <img ng-src="{{data.thumb}}" class="wf-thumbnail" alt="找不到该图片">
            </div>
          </div>
        </div>
        <div class="form-group" ng-show="showThumbPhotoUpload">
          <div class="col-sm-8 col-sm-offset-3">
            <input id="thumb-upload-input" class="file" name="file" type="file" data-min-file-count="1">
          </div>
        </div>
      </ng-form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()" ng-disabled="modalForm.$invalid">确定</button>
  </div>
</div>